home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Dogs / Multimedia Dogs v2.0.iso / mac / Multimedia Dogs 2.0 / MMDOGS2.DXR / 00266_CDROM handlers.ls < prev    next >
Encoding:
Text File  |  1995-10-09  |  730 b   |  31 lines

  1. on getPathDelim
  2.   if the machineType < 256 then
  3.     return ":"
  4.   else
  5.     return "\"
  6.   end if
  7. end
  8.  
  9. on findVolume theSpecialFile
  10.   if the machineType < 256 then
  11.     alert("findVolume() is a Windows-only handler.")
  12.     exit
  13.   end if
  14.   set theVolume to EMPTY
  15.   repeat with i = 1 to 26
  16.     set theDrive to numToChar(91 - i) & ":"
  17.     set thePath to theDrive & "\" & "data" & "\" & theSpecialFile
  18.     set myFile to FileIO(mnew, "read", thePath)
  19.     if objectp(myFile) then
  20.       set theVolume to theDrive
  21.       myFile(mdispose)
  22.       exit repeat
  23.     end if
  24.   end repeat
  25.   if theVolume = EMPTY then
  26.     fatalError("Please check that the disc is in your CD drive.")
  27.   end if
  28.   putDebug("theVolume = " & theVolume)
  29.   return theVolume
  30. end
  31.